package com.yj.ccs.abs.common.enums;

/**
 * Copyright 2018 (C) Yunjian-VC
 * Created on : 2018/3/21
 * Author     : Unbelievable9
 **/
public enum AssetStatusType {

    /**
     * 1 - 待提交入池
     * 2 - 待审核入池
     * 3 - 已入池
     * 4 - 待赎回
     * 5 - 待回购
     * 6 - 已回收
     */
    WAIT_TO_APPLY(1),
    WAIT_TO_VERIFY(2),
    IN_POOL(3),
    WAIT_TO_REDEEM(4),
    WAIT_TO_BUY_BACK(5),
    RECOVERED(6);

    private Integer value;

    AssetStatusType(Integer value) {
        this.value = value;
    }

    public Integer getValue() {
        return value;
    }

    public static AssetStatusType fromValue(Integer value) {
        for (AssetStatusType assetStatusType : AssetStatusType.values()) {
            if (assetStatusType.getValue().equals(value)) {
                return assetStatusType;
            }
        }

        return null;
    }
}
